package org.ne.banksys.service;

import com.github.pagehelper.Page;
import org.ne.banksys.entity.Card;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.List;

/**
 * @author wey
 * @date 2025/6/13 下午10:40 06
 **/
public interface CardService {
    List<Card> getAll();
    Card selectCardById(String id);
    void updateAmount(String cardId, BigDecimal amount);
    void insert(Card card);
    void reportLoss(String cardId);
    void reportReturn(String cardId);
    void deleteCard(String cardId);
    void updatePwd(String cardId, String password);
    void update(Card card);
    Card registerCard(Long customerId);
    List<Card> selectCardByCustomerId(Long customerId);

    Page<Card> getAllCards(Integer page, Integer size);


    List<Card> filterByOpenDateRange(
            Timestamp startDate,
            Timestamp endDate
    );

    List<Card> filterByOpenMoneyRange(
            BigDecimal minMoney,
            BigDecimal maxMoney
    );
    List<Card> filterCards(
            Timestamp startDate,
            Timestamp endDate,
            BigDecimal minMoney,
            BigDecimal maxMoney
    );
}
